home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr23 / commo642.zip / SAMPLES.MAC < prev    next >
Text File  |  1995-03-18  |  11KB  |  282 lines

  1.                   ┌───────────────────────────┐
  2.                   │ Additional Macro Examples │
  3.                   └───────────────────────────┘
  4.  
  5. This file contains a number of sample macros.  They may need to be modified to
  6. work for you.  Feel free to copy any of them to COMMO.MAC or to an auxiliary
  7. Macro File.
  8.  
  9.  
  10.  Macros used with external Zmodem drivers
  11.  ───────────────────────────────────────────────────────────────────────────
  12.  
  13. For OMEN Technology programs, add the following macros at the top of COMMO.MAC
  14. (if necessary, substitute "dsz.com" or "dsz.exe" for "gsz.exe"):
  15.  
  16.   {:z_recv}
  17.   {exec-d %protodir\gsz.exe portx %_pad,%_irq ha both rz -mr %pr_down}
  18.   {alarm %pr_alarm} {retu}
  19.  
  20.   {:z_send}
  21.   {exec-d %protodir\gsz.exe portx %_pad,%_irq ha both sz -mr %pr_file}
  22.   {alarm %pr_alarm} {retu}
  23.  
  24. For TEXAS Zmodem, add the following:
  25.  
  26.   {:z_recv}
  27.   {exec-d %protodir\txzm.exe -c%_pad,%_irq -l%_spe -b%_mod -h -q -r %pr_down}
  28.   {alarm %pr_alarm} {retu}
  29.  
  30.   {:z_send}
  31.   {exec-d %protodir\txzm.exe -c%_pad,%_irq -l%_spe -b%_mod -h -q -s %pr_file}
  32.   {alarm %pr_alarm} {retu}
  33.  
  34. For other Zmodem drivers, adapt the program's command line to create macros
  35. similar to the above.
  36.  
  37.  
  38.  Generic login macro
  39.  ───────────────────────────────────────────────────────────────────────────
  40. My generic login macro will login to most popular BBS's.  The generic login
  41. subroutine can be called from mail run macros, etc.  The GOLOok with
  42. ";passwor" ignores the string "password" in the opening instructions on an
  43. Auntie board.  Put {login} in your Dialing Directory macro field.
  44.  
  45.   {:login} {capture y,c:\commo\commo.cap}      RBBS, PCBoard, Auntie, etc.
  46.            {asci ,} {call gls} {}
  47.  
  48.  Generic login subroutine
  49.  ───────────────────────────────────────────────────────────────────────────
  50.   {:gls} {setlook 60,hng,10,|}
  51.          {setv ss_r,~|} {setv ss_yr,~y|}
  52.   {:li1} {sslo ss_r,(enter)}            {sslo ss_yr,graphics (enter)}
  53.          {calo li1,li2,first name}      {calo li1,li3,last name}
  54.          {sslo ss_yr,is this correct}   {golo li1,;passwor}
  55.          {lookfor password}             {send ~%_pas|} {return}
  56.   {:li2} {send ~Firstname|} {return}
  57.   {:li3} {send ~Lastname|} {return}
  58.  
  59.  
  60.  Start my mail reader after a mail run
  61.  ───────────────────────────────────────────────────────────────────────────
  62.   {:cf3} {exec-ns slmr} {}                     SLMR Reader w/swap
  63.  
  64.  
  65.  Macros used at session termination
  66.  ───────────────────────────────────────────────────────────────────────────
  67. These two utilities are used in various macros.  "hng" will hangup when
  68. necessary, then "ncr" will wait for carrier detect to drop and continue
  69. dialing numbers that are still marked.
  70.  
  71.   {:hng} {pause 3} {hangup y}
  72.   {:ncr} {pause 1} {ifcarrier ncr} {pause 5} {dial ,} {beep} {}
  73.  
  74.  
  75.  PCBoard generic mailrun
  76.  ───────────────────────────────────────────────────────────────────────────
  77. Here is a macro using variables to do a mail run on a PCBoard with CAM-Mail,
  78. Rosemail, QMail, etc.  It will download only one packet each day and upload a
  79. reply packet if one exists (deleting the packet if the upload is successful),
  80. then log off.
  81.  
  82. This macro should be placed in a separate Macro File.  E.g., PCBMAIL.MAC.
  83.  
  84. Five variables must be set prior to starting this macro.  For convenience,
  85. these can be set in the Dialing Directory entry.  For example, to call Channel
  86. 1 and use the CAM-Mail door, the Dialing Directory entry (all on one line!)
  87. would be:
  88.  
  89.   Channel1        11/06/94  {1 617 354 5776} {password} ...
  90.       ...  {start,pcbmail.mac} {} {bbsid,channel1} {opendoor,mail} ...
  91.       ...  {maildoor,cam-mail} {nomsgs,no new messages} {ptim,3}
  92.  
  93. When a connection is made, {COMMO} will load PCBMAIL.MAC and GOTO the label
  94. "start".  If nodes are labeled "Channel11", "Channel12", etc., they will all
  95. be UNMArked when the macro starts.
  96.  
  97.   {:start}
  98.         {setv ss_r,~|}          Variables for SSLOoks
  99.         {setv ss_y,~y}            (These may be defined in COMMO.SET
  100.         {setv ss_yr,~y|}           using "set" items.  Then they can
  101.         {setv ss_n,~n}             be used in other macros, too.)
  102.         {setv ss_nr,~n|}
  103.         {setv ss_c,~c}
  104.         {setv ss_ee,~~~~^[~^[}
  105.  
  106.         {unmark %bbsid%1,%bbsid%2,%bbsid%3,%bbsid%4,%bbsid%5}
  107.         {setv qwkfil,c:\slmr\store\%bbsid.qwk}
  108.         {capm filter}
  109.         {capt y,c:\cap\%bbsid.%_day} {asci ,}
  110.         {setl 30,hng}
  111.         {sslo ss_ee,press escape}
  112.         {sslo ss_ee,<esc> twice}
  113.         {golo ,pcboard (r)}
  114.         {look ^g}
  115.         {call gls}
  116.         {setl 60,hng,%ptim,n|}
  117.         {sslo ss_r,to continue}
  118.         {sslo ss_nr,(enter)=yes?}
  119.         {sslo ss_nr,(H)elp, More?}
  120.         {sslo ss_c,(C)ontinue}
  121.         {golo ,channel 1 command?}
  122.         {look main board command?}
  123.         {setl 120,hng}  ** turn off prompt timer
  124.         {send open %opendoor|}
  125.         {look %maildoor command}
  126.         {file %qwkfil} {ifco ,mr_dl}
  127.         {comp _ffd,%_dat} {ifco mr_ul}   ** only one .QWK per day
  128.   {:mr_dl}
  129.         {send d|}
  130.         {golo mr_ul,%nomsgs} {sslo ss_yr,when done?}
  131.         {sslo ss_yr,(y/n)} {sslo ss_yr,receive these}
  132.         {look %bbsid.qwk}
  133.         {call mail_dn} {look %maildoor command}
  134.         {ifex %qwkfil,,mr_dl}  ** if error, try again
  135.   {:mr_ul}
  136.         {ifex %uldir\%bbsid.rep,,mr_gb}  ** if reply, upload it
  137.         {send u|} {look %bbsid.rep} {call mail_up}
  138.         {look %maildoor command} {ifcon ,mr_ul} ** if error, try again
  139.   {:mr_gb}
  140.         {send g|} {goto hng}
  141.  
  142.  
  143.  WildCat! generic mailrun
  144.  ───────────────────────────────────────────────────────────────────────────
  145. The following macro does a mail run on most WildCat! BBS's with the TomCat!
  146. mail door.  The only variables that need to be set are "bbsid" and "ptim."
  147. The "ss_" variables may be set in the Setup File (using the "set" keyword).
  148.  
  149. This macro should be placed in a separate Macro File.  E.g., CATMAIL.MAC.
  150.  
  151.   {:catmail}
  152.         {setv ss_ee,~^[^[}
  153.         {setv ss_r,~|}
  154.         {setv ss_y,~y}         ** These assume "hotkeys" are set
  155.         {setv ss_n,~n}
  156.         {setv ss_bday,~mm-dd-yy|}      <- your birthdate
  157.         {setv ss_pnum,~614-326-1309|}  <- your phone number
  158.         {setv ss_name,~First Last|}    <- your name
  159.  
  160.         {unmark %bbsid%1,%bbsid%2,%bbsid%3,%bbsid%4,%bbsid%5}
  161.         {setv qwkfil,c:\slmr\store\%bbsid.qwk}
  162.         {capm filter}
  163.         {capt y,c:\cmsg\%bbsid.%_day} {asci ,}
  164.         {setl 60,hng}
  165.         {sslo ss_ee,twice}
  166.         {sslo ss_r,[c]ontinue}
  167.         {sslo ss_name,first name}
  168.         {look password?} {send %_pas|}
  169.         {setl 120,hng,%ptim,|}
  170.         {sslo ss_r,[c]ontinue}
  171.         {sslo ss_r,[enter]}
  172.         {sslo ss_n,choice? [ ]}
  173.         {sslo ss_bday,birth date}
  174.         {sslo ss_pnum,phone number}
  175.         {sslo ss_n,bulletin menu?}
  176.         {golo ,push a key}              ** Various main menu prompts
  177.         {golo ,your command}
  178.         {look main menu:} {send ~~m}
  179.         {golo ,push a key}              ** Various message menu prompts
  180.         {golo ,your command}
  181.         {look message menu:} {send ~~d}
  182.   {:wc_md}
  183.         {setl 120,hng}  ** turn off prompt timer
  184.         {sslo ss_r,[c]ontinue}
  185.         {golo ,tomcat menu}
  186.         {look wcmail command}
  187.         {file %qwkfil} {ifco ,wc_dl}
  188.         {comp _ffd,%_dat} {ifco wc_ul}   ** only one .QWK per day
  189.   {:wc_dl}
  190.         {pause 1} {send d}
  191.         {golo wc_ul,nothing found}
  192.         {sslo ss_y,receive this packet}
  193.         {look %bbsid.qwk now}
  194.         {call mail_dn}
  195.         {golo ,tomcat menu}
  196.         {look wcmail command}
  197.         {ifex %qwkfil,,wc_dl}  ** if error, try again
  198.         {exec-n c:\slmr\weldel.bat %bbsid}      ** delete welcome, etc.
  199.   {:wc_ul}
  200.         {ifex %uldir\%bbsid.rep,,wc_bye}  ** if reply, upload it
  201.         {pause 1} {send u}
  202.         {look %bbsid.rep} {call mail_up}
  203.         {golo ,tomcat menu}
  204.         {look wcmail command}
  205.         {ifcon ,wc_ul}  ** if error, try again
  206.   {:wc_bye}
  207.         {pause 1} {send g}
  208.         {setl 2,hng}
  209.         {look logoff [y/n]} {send y}
  210.         {pause 1} {goto hng}
  211.  
  212.  
  213.  Mail download and upload subroutines
  214.  ───────────────────────────────────────────────────────────────────────────
  215. The mail download subroutine will rename your .QWK packets, keeping the last
  216. six packets for each BBS.  Mail upload will delete your .REP packet if the
  217. upload is successful.  These routines use Zmodem.  You may want to change the
  218. directories used.
  219.  
  220.   {:mail_dn}
  221.         {ifex c:\slmr\store\%bbsid.qwk,,mail_dn1}
  222.         {exec-n del c:\slmr\store\%bbsid.1 > nul}
  223.         {exec-n ren c:\slmr\store\%bbsid.2 %bbsid.1 > nul}
  224.         {exec-n ren c:\slmr\store\%bbsid.3 %bbsid.2 > nul}
  225.         {exec-n ren c:\slmr\store\%bbsid.4 %bbsid.3 > nul}
  226.         {exec-n ren c:\slmr\store\%bbsid.5 %bbsid.4 > nul}
  227.         {exec-n ren c:\slmr\store\%bbsid.qwk %bbsid.5 > nul}
  228.   {:mail_dn1}
  229.         {setv pr_down,c:\slmr\store}
  230.         {setv pr_alarm,0}
  231.         {look ^XB00}
  232.         {call z_recv}
  233.         {ifer 1,,mail_dn2}
  234.         {exec-n del c:\slmr\store\%bbsid.qwk}
  235.   {:mail_dn2}
  236.         {return}
  237.  
  238.   {:mail_up}
  239.         {setv pr_file,%uldir\%bbsid.rep}
  240.         {setv pr_alarm,0}
  241.         {call z_send}
  242.         {ifer 1,mail_up1}
  243.         {exec-N del %uldir\%bbsid.rep}
  244.   {:mail_up1}
  245.         {comp %_err,0} {return}
  246.  
  247.  
  248.  Message reading macros
  249.  ───────────────────────────────────────────────────────────────────────────
  250. These two macros are used for reading messages online.  They use the grey plus
  251. and minus keys in the lower right corner of the keyboard.  The first one sends
  252. a <cr>, then clears the screen.  Makes messages a lot easier to read since
  253. each one starts displaying at the top of the screen.  The second macro just
  254. sends a <cr>.  Nice for keyboards without the extra Enter key.
  255.  
  256.   {:gr+} {send |} {clear} {}
  257.   {:gr-} {send |} {}
  258.  
  259.  
  260.  History macro
  261.  ───────────────────────────────────────────────────────────────────────────
  262. Here is an online history macro.  It allows you to resend anything that
  263. appeared on the screen (commands, message quotes, etc.).  You must have
  264. Scrollback enabled.
  265.  
  266. It first saves the Screen Image File pathname in the variable "scrsav" (in
  267. case you have stuff in that file you want to keep).
  268.  
  269. Then it sets the Screen Image File to a temporary file and goes into
  270. Scrollback.  In Scrollback you use the "W" command to write out the lines
  271. containing the data you want to resend.  Press Esc and edit the data.
  272.  
  273. Save the file and press Esc to exit the editor.  The macro then does an ASCII
  274. Upload of the file and deletes it.  Then the Screen Image pathname is restored
  275. to what it was before.
  276.  
  277.   {:cf6} {setv scrsav,%_scr} {screen n,%dldir\temp} {scroll}
  278.          {edit %_scr} {asci %_scr} {exec-N del %_scr}
  279.          {screen n,%scrsav} {}
  280.  
  281.                                 - end -
  282.